***********************************************************************************
***	Replication file for:                                                     	***
*** Braun, S. T. and Stuhler, J. (2024). The Economic Consequences of 			***
***	Being Widowed by War: A Life-Cycle Perspective.	     						***
***																				***
***	Journal of Public Economics                                                 ***
***   							                                                ***
*** Script:		3-allbus-prep-merge.do							   			 	***	
*** Purpose:	merge and prepare data, ALLBUS wave 1980-88						***
***																				***
*** Tables:		---																***
***	Figures:	---																***
***********************************************************************************

* Preamble (unnecessary when executing run.do)
run "$widowsallbus/scripts/programs/_config.do"

************
* Code begins
************
  
*** Load waves
use "$widowsallbus/processed/allbus1980_86_edit.dta", clear
append using "$widowsallbus/processed/allbus1988_edit.dta"

*** Order data

order years_schooling_father death_father_WW2 death_mother_WW2 death_mother_b1945, after(school_degree_father) 
order d_workwife_famsuffers d_workwife_happier d_women_preferhh d_housewife_occ d_workwife_ind d_work_both_spouse d_task_women_hh women_work_nokids women_work_smallkids women_work_schoolkids, after(d_work_wife_amarriage)  

*** save

save "$widowsallbus/processed/allbus1980_88_edit.dta", replace

*** EOF